#include "../compile_server/compile_run.hpp"


using namespace ns_compile_and_run;

int main()
{
    std::string in_json;
    Json::Value in_value;
    //R"()"  保持特殊字符的原貌
    in_value["code"]=R"(
    #include<iostream>
    int main(){
        std::cout<<"hello"<<std::endl;
        return 0;
    })";
    in_value["input"]="";
    in_value["cpu_limit"]=1;
    in_value["mem_limit"]=10240 * 3;

    Json::FastWriter writer;
    in_json = writer.write(in_value);

    std::cout<< in_json<<std::endl;

    std::string ou_json;

    CompileAndRun::Start(in_json,&ou_json);

    std::cout<< ou_json<<std::endl;

    
    return 0;
}